﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ParkingLot.Entitys.Enums;

namespace ParkingLot.Entitys
{
    /// <summary>
    /// 提示类
    /// </summary>
    public class Prompt
    {
        private ExceptionType m_ExceptionType= ExceptionType.None;

        /// <summary>
        /// 异常类型
        /// </summary>
        public ExceptionType ExceptionType
        {
            get { return m_ExceptionType; }
            set
            {
                m_ExceptionType = value;
                if (m_ExceptionType == ExceptionType.None)
                {
                    m_HaveException = false;
                }
                else
                {
                    m_HaveException = true;
                }
            }

        }

        private string m_Message;

        /// <summary>
        /// 需要传递的消息
        /// </summary>
        public string Message
        {
            get { return m_Message; }
            set { m_Message = value; }
        }

        /// <summary>
        /// 是否有错误和异常
        /// </summary>
        public bool HaveException
        {
            get { return m_HaveException; }
        }

        private bool m_HaveException = false;



    }
}
